<template>
  <div class="red-message">
    <el-button :plain="true" @click="open2">success</el-button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { ElMessage } from 'element-plus';

export default defineComponent({
  setup() {
    const open2 = () => {
      ElMessage({
        message: 'Congrats, this is a success message.',
        type: 'success'
      });
    };

    return { open2 };
  }
});
</script>

<style scoped lang="less"></style>
